3.675 \(\int \frac {(a+i a \tan (e+f x)) (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^5} \, dx\)

Optimal. Leaf size=55 \[ \frac {a (A-i B)}{5 c^5 f (\tan (e+f x)+i)^5}+\frac {a B}{4 c^5 f (\tan (e+f x)+i)^4} \]

[Out]

1/5*a*(A-I*B)/c^5/f/(tan(f*x+e)+I)^5+1/4*a*B/c^5/f/(tan(f*x+e)+I)^4

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.051, Rules used = {3588, 43} \[ \frac {a (A-i B)}{5 c^5 f (\tan (e+f x)+i)^5}+\frac {a B}{4 c^5 f (\tan (e+f x)+i)^4} \]

Antiderivative was successfully verified.

[In]

Int[((a + I*a*Tan[e + f*x])*(A + B*Tan[e + f*x]))/(c - I*c*Tan[e + f*x])^5,x]

[Out]

(a*(A - I*B))/(5*c^5*f*(I + Tan[e + f*x])^5) + (a*B)/(4*c^5*f*(I + Tan[e + f*x])^4)

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 3588

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(a*c)/f, Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x
], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]

Rubi steps

\begin {align*} \int \frac {(a+i a \tan (e+f x)) (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^5} \, dx &=\frac {(a c) \operatorname {Subst}\left (\int \frac {A+B x}{(c-i c x)^6} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \operatorname {Subst}\left (\int \left (\frac {-A+i B}{c^6 (i+x)^6}-\frac {B}{c^6 (i+x)^5}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {a (A-i B)}{5 c^5 f (i+\tan (e+f x))^5}+\frac {a B}{4 c^5 f (i+\tan (e+f x))^4}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 3.06, size = 124, normalized size = 2.25 \[ -\frac {i a (\cos (6 (e+f x))+i \sin (6 (e+f x))) (5 (6 A+i B) \cos (2 (e+f x))+4 (3 A+2 i B) \cos (4 (e+f x))-10 i A \sin (2 (e+f x))-8 i A \sin (4 (e+f x))+20 A+15 B \sin (2 (e+f x))+12 B \sin (4 (e+f x)))}{320 c^5 f} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + I*a*Tan[e + f*x])*(A + B*Tan[e + f*x]))/(c - I*c*Tan[e + f*x])^5,x]

[Out]

((-1/320*I)*a*(20*A + 5*(6*A + I*B)*Cos[2*(e + f*x)] + 4*(3*A + (2*I)*B)*Cos[4*(e + f*x)] - (10*I)*A*Sin[2*(e
+ f*x)] + 15*B*Sin[2*(e + f*x)] - (8*I)*A*Sin[4*(e + f*x)] + 12*B*Sin[4*(e + f*x)])*(Cos[6*(e + f*x)] + I*Sin[
6*(e + f*x)]))/(c^5*f)

________________________________________________________________________________________

fricas [B]  time = 1.06, size = 94, normalized size = 1.71 \[ \frac {{\left (-2 i \, A - 2 \, B\right )} a e^{\left (10 i \, f x + 10 i \, e\right )} + {\left (-10 i \, A - 5 \, B\right )} a e^{\left (8 i \, f x + 8 i \, e\right )} - 20 i \, A a e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (-20 i \, A + 10 \, B\right )} a e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (-10 i \, A + 10 \, B\right )} a e^{\left (2 i \, f x + 2 i \, e\right )}}{320 \, c^{5} f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))^5,x, algorithm="fricas")

[Out]

1/320*((-2*I*A - 2*B)*a*e^(10*I*f*x + 10*I*e) + (-10*I*A - 5*B)*a*e^(8*I*f*x + 8*I*e) - 20*I*A*a*e^(6*I*f*x +
6*I*e) + (-20*I*A + 10*B)*a*e^(4*I*f*x + 4*I*e) + (-10*I*A + 10*B)*a*e^(2*I*f*x + 2*I*e))/(c^5*f)

________________________________________________________________________________________

giac [B]  time = 3.57, size = 277, normalized size = 5.04 \[ -\frac {2 \, {\left (5 \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} + 20 i \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} - 5 \, B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} - 60 \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 10 i \, B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 100 i \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 25 \, B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 126 \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 24 i \, B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 100 i \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 25 \, B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 60 \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 10 i \, B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 20 i \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 5 \, B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 5 \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{5 \, c^{5} f {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{10}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))^5,x, algorithm="giac")

[Out]

-2/5*(5*A*a*tan(1/2*f*x + 1/2*e)^9 + 20*I*A*a*tan(1/2*f*x + 1/2*e)^8 - 5*B*a*tan(1/2*f*x + 1/2*e)^8 - 60*A*a*t
an(1/2*f*x + 1/2*e)^7 - 10*I*B*a*tan(1/2*f*x + 1/2*e)^7 - 100*I*A*a*tan(1/2*f*x + 1/2*e)^6 + 25*B*a*tan(1/2*f*
x + 1/2*e)^6 + 126*A*a*tan(1/2*f*x + 1/2*e)^5 + 24*I*B*a*tan(1/2*f*x + 1/2*e)^5 + 100*I*A*a*tan(1/2*f*x + 1/2*
e)^4 - 25*B*a*tan(1/2*f*x + 1/2*e)^4 - 60*A*a*tan(1/2*f*x + 1/2*e)^3 - 10*I*B*a*tan(1/2*f*x + 1/2*e)^3 - 20*I*
A*a*tan(1/2*f*x + 1/2*e)^2 + 5*B*a*tan(1/2*f*x + 1/2*e)^2 + 5*A*a*tan(1/2*f*x + 1/2*e))/(c^5*f*(tan(1/2*f*x +
1/2*e) + I)^10)

________________________________________________________________________________________

maple [A]  time = 0.23, size = 45, normalized size = 0.82 \[ \frac {a \left (-\frac {i B -A}{5 \left (\tan \left (f x +e \right )+i\right )^{5}}+\frac {B}{4 \left (\tan \left (f x +e \right )+i\right )^{4}}\right )}{f \,c^{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))^5,x)

[Out]

1/f*a/c^5*(-1/5*(-A+I*B)/(tan(f*x+e)+I)^5+1/4*B/(tan(f*x+e)+I)^4)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))^5,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

mupad [B]  time = 8.60, size = 82, normalized size = 1.49 \[ \frac {\frac {a\,\left (4\,A+B\,1{}\mathrm {i}\right )}{20}+\frac {B\,a\,\mathrm {tan}\left (e+f\,x\right )}{4}}{c^5\,f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^5+{\mathrm {tan}\left (e+f\,x\right )}^4\,5{}\mathrm {i}-10\,{\mathrm {tan}\left (e+f\,x\right )}^3-{\mathrm {tan}\left (e+f\,x\right )}^2\,10{}\mathrm {i}+5\,\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*tan(e + f*x))*(a + a*tan(e + f*x)*1i))/(c - c*tan(e + f*x)*1i)^5,x)

[Out]

((a*(4*A + B*1i))/20 + (B*a*tan(e + f*x))/4)/(c^5*f*(5*tan(e + f*x) - tan(e + f*x)^2*10i - 10*tan(e + f*x)^3 +
 tan(e + f*x)^4*5i + tan(e + f*x)^5 + 1i))

________________________________________________________________________________________

sympy [B]  time = 0.90, size = 348, normalized size = 6.33 \[ \begin {cases} - \frac {10485760 i A a c^{20} f^{4} e^{6 i e} e^{6 i f x} + \left (5242880 i A a c^{20} f^{4} e^{2 i e} - 5242880 B a c^{20} f^{4} e^{2 i e}\right ) e^{2 i f x} + \left (10485760 i A a c^{20} f^{4} e^{4 i e} - 5242880 B a c^{20} f^{4} e^{4 i e}\right ) e^{4 i f x} + \left (5242880 i A a c^{20} f^{4} e^{8 i e} + 2621440 B a c^{20} f^{4} e^{8 i e}\right ) e^{8 i f x} + \left (1048576 i A a c^{20} f^{4} e^{10 i e} + 1048576 B a c^{20} f^{4} e^{10 i e}\right ) e^{10 i f x}}{167772160 c^{25} f^{5}} & \text {for}\: 167772160 c^{25} f^{5} \neq 0 \\\frac {x \left (A a e^{10 i e} + 4 A a e^{8 i e} + 6 A a e^{6 i e} + 4 A a e^{4 i e} + A a e^{2 i e} - i B a e^{10 i e} - 2 i B a e^{8 i e} + 2 i B a e^{4 i e} + i B a e^{2 i e}\right )}{16 c^{5}} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))**5,x)

[Out]

Piecewise((-(10485760*I*A*a*c**20*f**4*exp(6*I*e)*exp(6*I*f*x) + (5242880*I*A*a*c**20*f**4*exp(2*I*e) - 524288
0*B*a*c**20*f**4*exp(2*I*e))*exp(2*I*f*x) + (10485760*I*A*a*c**20*f**4*exp(4*I*e) - 5242880*B*a*c**20*f**4*exp
(4*I*e))*exp(4*I*f*x) + (5242880*I*A*a*c**20*f**4*exp(8*I*e) + 2621440*B*a*c**20*f**4*exp(8*I*e))*exp(8*I*f*x)
 + (1048576*I*A*a*c**20*f**4*exp(10*I*e) + 1048576*B*a*c**20*f**4*exp(10*I*e))*exp(10*I*f*x))/(167772160*c**25
*f**5), Ne(167772160*c**25*f**5, 0)), (x*(A*a*exp(10*I*e) + 4*A*a*exp(8*I*e) + 6*A*a*exp(6*I*e) + 4*A*a*exp(4*
I*e) + A*a*exp(2*I*e) - I*B*a*exp(10*I*e) - 2*I*B*a*exp(8*I*e) + 2*I*B*a*exp(4*I*e) + I*B*a*exp(2*I*e))/(16*c*
*5), True))

________________________________________________________________________________________